package com.iflytek.document;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.List;

@Data
@Document(indexName = "role_info")
public class RoleDocument {
    @Id
    @ApiModelProperty(value = "ID,新增不传", example = "1")
    private Long id;

    @Field(name = "name", type = FieldType.Text)
    @ApiModelProperty(value = "名称")
    private String name;

    @Field(name = "description", type = FieldType.Text)
    @ApiModelProperty(value = "描述")
    private String description;

    @Field(name = "permission", type = FieldType.Text)
    @ApiModelProperty(value = "权限列表")
    private List<Long> permission;
}
